package com.auemall.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.auemall.dao.ProductCategoryMapper;
import com.auemall.po.ProductCategory;
import com.auemall.service.ProductCategoryService;

@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

	@Autowired
	private ProductCategoryMapper productCategoryMapper;
	
	
	public int deleteByPrimaryKey(Integer id) {
		
		return productCategoryMapper.deleteByPrimaryKey(id);
	}

	
	public int insert(ProductCategory record) {
		
		return productCategoryMapper.insert(record);
	}

	
	public int insertSelective(ProductCategory record) {
		
		return productCategoryMapper.insertSelective(record);
	}

	
	public ProductCategory selectByPrimaryKey(Integer id) {
		
		return productCategoryMapper.selectByPrimaryKey(id);
	}

	
	public int updateByPrimaryKeySelective(ProductCategory record) {
		
		return productCategoryMapper.updateByPrimaryKeySelective(record);
	}

	
	public int updateByPrimaryKey(ProductCategory record) {
		
		return productCategoryMapper.updateByPrimaryKey(record);
	}
	
    public List<ProductCategory> findAllProductCategory(){
    	
    	return productCategoryMapper.findAllProductCategory();
    }


	@Override
	public List<ProductCategory> getProductCategoryChildrenModues(
			Integer parent_id) {
		
		return productCategoryMapper.getProductCategoryChildrenModues(parent_id);
	}

}
